<?php
	
	include "./db_conf.php";
	
	try{
	
		$dsn = "mysql:host=$db_host;dbname=$db_name";
	
		$pdo = new PDO($dsn,$db_user,$db_pass,array(PDO::ATTR_ERRMODE=>PDO::ERRMODE_EXCEPTION));
		
		$pdo->query("set names utf8");
		
		$sql = file_get_contents("./weixin.sql");
	
		$stmt = $pdo->query($sql);
		
		if($stmt){
		
			echo "创建数据表成功！";
		
		}
	
	}catch(PDOException $e){
	
		exit($e->getMessage());
	
	}
	
	